package com.zmytest.service.impl;

import com.zmytest.annotation.CreateSession;
import com.zmytest.annotation.ParamName;
import com.zmytest.service.TestService;
import org.springframework.stereotype.Service;

import javax.validation.constraints.NotNull;

/**
 * Created on 2018/12/21.
 *
 * @author zhangmingyu
 */
@Service
public class TestServiceImpl implements TestService {

    /**
     * 入参为基本类型时，aop joinPoint获取入参参数名时有问题，获取不到
     * @param i
     * @param j
     * @return
     */
    @Override
    @CreateSession(key = "$IN.i",value = "$IN.j")
    public String test(int i, int j) {
        System.out.println("test service hello ");
        return null;
    }

    @Override
    @CreateSession( key = "$IN.i",value = "$IN.j")
    public String test2(@ParamName(value = "i") String i, @ParamName("j") String j) {
        System.out.println("test2 service hello ");
        return null;
    }
}
